<!DOCTYPE html>
<html>
<head>
<title>定时任务</title>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<link href="../../css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
<link href="../../css/font-awesome.css?v=4.4.0" rel="stylesheet">
<link href="../../css/style.css?v=4.1.0" rel="stylesheet">
<!-- jqgrid-->
<link href="../../css/plugins/jqgrid/ui.jqgrid.css?0820" rel="stylesheet">
<!-- ztree -->
<link rel="stylesheet" href="../../js/zTree/css/zTreeStyle/zTreeStyle.css" type="text/css">
<script src="../../libs/jquery.min.js"></script>
<script src="../../js/plugins/layer/layer.min.js"></script>
<script src="../../libs/bootstrap.min.js"></script>
<script src="../../libs/vue.min.js"></script>
<!-- jqGrid -->
<script src="../../js/plugins/jqgrid/i18n/grid.locale-cn.js?0820"></script>
<script src="../../js/plugins/jqgrid/jquery.jqGrid.min.js?0820"></script>
<script src="../../js/plugins/layer/laydate/laydate.js"></script>
<!-- ztree -->
<script type="text/javascript" src="../../js/zTree/js/jquery.ztree.core.js"></script>
<script type="text/javascript" src="../../js/zTree/js/jquery.ztree.excheck.js"></script>
<script type="text/javascript" src="../../js/zTree/js/jquery.ztree.exedit.js"></script>
<script src="../../js/common.js"></script>
</head>
<body>
<div id="rrapp" v-cloak>
	<div class="wrapper wrapper-content  animated fadeInshop_right">
		<div class="row">
			<div class="col-sm-12">
				<div class="ibox ">
					<div class="ibox-content">
						<div class="ibox-content">
							<form role="form" class="form-inline" style="text-align:right;">
									<input type="text" class="form-control" v-model="q.beanName" @keyup.enter="query" placeholder="bean名称">
									<a class="btn btn-sm btn-default" @click="query">&nbsp;查询</a>
									<a v-if="hasPermission('/sys/schedule/save')" class="btn btn-sm btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
									<a v-if="hasPermission('/sys/schedule/update')" class="btn btn-sm btn-primary" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
									<a v-if="hasPermission('/sys/schedule/delete')" class="btn btn-sm btn-primary" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
									<a v-if="hasPermission('/sys/schedule/pause')" class="btn btn-sm btn-primary" @click="pause"><i class="fa fa-pause"></i>&nbsp;暂停</a>
									<a v-if="hasPermission('/sys/schedule/resume')" class="btn btn-sm btn-primary" @click="resume"><i class="fa fa-play"></i>&nbsp;恢复</a>
									<a v-if="hasPermission('/sys/schedule/run')" class="btn btn-sm btn-primary" @click="runOnce"><i class="fa fa-arrow-circle-right"></i>&nbsp;立即执行</a>
									<a v-if="hasPermission('/sys/schedule/log')" class="btn btn-sm btn-danger" style="float:right;" href="schedule_log.html">日志列表</a>
							</form>
						</div>
						<div class="jqGrid_wrapper">
							<table id="jqGrid"></table>
							<div id="jqGridPager"></div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
	<div id="option_list" class="modal fade" data-backdrop="static" data-keyboard="false" aria-hidden="true">
		<div class="modal-dialog">
			<div class="col-sm-12">
				<div class="ibox float-e-margins">
					<div class="ibox-title">
						<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
						<h5>{{title}}</h5>
					</div>
					<div class="ibox-content">
						<form class="form-horizontal">
							<div class="form-group">
								<div class="col-sm-2 control-label">bean名称</div>
								<div class="col-sm-10">
									<input type="text" class="form-control" v-model="schedule.beanName" placeholder="spring bean名称，如：testTask"/>
								</div>
							</div>
							<div class="form-group">
								<div class="col-sm-2 control-label">方法名称</div>
								<div class="col-sm-10">
									<input type="text" class="form-control" v-model="schedule.methodName" placeholder="方法名称"/>
								</div>
							</div>
							<div class="form-group">
								<div class="col-sm-2 control-label">参数</div>
								<div class="col-sm-10">
									<input type="text" class="form-control" v-model="schedule.params" placeholder="参数"/>
								</div>
							</div>
							<div class="form-group">
								<div class="col-sm-2 control-label">cron表达式</div>
								<div class="col-sm-10">
									<input type="text" class="form-control" v-model="schedule.cronExpression" placeholder="如：0 0 12 * * ?"/>
								</div>
							</div>
							<div class="form-group">
								<div class="col-sm-2 control-label">备注</div>
								<div class="col-sm-10">
									<input type="text" class="form-control" v-model="schedule.remark" placeholder="备注"/>
								</div>
							</div>
							<div class="form-group">
								<div class="col-sm-2 control-label"></div>
								<input type="button" class="btn btn-primary" @click="saveOrUpdate" value="确定"/>
							</div>
						</form>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>

<script src="../../js/modules/job/schedule.js"></script>
</body>
</html>